package cn.knight.controller;

import cn.knight.User;
import cn.knight.feign.UserFeignClient;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
public class OrderCtrl {

    private UserFeignClient orderFeignClient;

    @GetMapping("/order/{id}")
    public User loadById(@PathVariable Long id){

        return orderFeignClient.loadById(id);

    }
}
